﻿namespace Core
{
    public abstract class AbstractSceneNode : Component, IInstruction, IAwake<int>, IStartUpdateFinish
    {
        public float Quota { get; protected set; }

        public virtual float Progress => Quota * currValue;

        public bool IsComplete { get; protected set; }

        protected float currValue = 0;
        protected AbstractScene Scene;

        public virtual void Awake(int quota)
        {
            Scene = Entity as AbstractScene;
            Quota = quota;
        }

        public abstract void Start();
        public virtual void Update() { }
        public abstract void Finish();
    }
}
